<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>批量导入账号</title>
    <link rel="stylesheet" href="../../lib/layui-v2.6.3/css/layui.css" media="all">
</head>
<body>
<div class="layui-container">
    <div class="layui-row">
        <div class="layui-col-lg-offset3 layui-col-lg6" style="margin-top:50px">
            <div><button type="button" class="layui-btn" id="test1">
                <i class="layui-icon">&#xe655;</i>上传Excel数据
            </button></div>
            <div>
                <a href="./orderInsertbeach.xlsx">下载数据模板文件</a>
            </div>

        </div>
    </div>
</div>


<script src="../../lib/layui-v2.6.3/layui.js"></script>
<script>
layui.use('upload', function(){
  var upload = layui.upload;

  //执行实例
  var uploadInst = upload.render({
    elem: '#test1' //绑定元素
    ,accept:'file'
    ,url: '/api/order/batchadd' //上传接口
    ,done: function(res){
      //上传完毕回调
      if(res.code==200){
        layer.msg("上传成功")

      }else{
        layer.msg("上传失败")
      }
    }
    ,error: function(){
      //请求异常回调
    }
  });
});
</script>
</body>
</html>